<?php

	include("common.php");
	
	$result = mysql_query("SELECT * FROM `197_articles` ORDER BY `post_date` ASC");
	$articles = array();
	while($row = mysql_fetch_assoc($result)){
		array_push($articles, $row);
	}
	
?>
<?php include("header.php"); ?>
<h1>作文平台</h1>
<ul>
	<?php foreach($articles as $row){ ?>
		<li><a href="articleInfo.php?article_id=<?php echo $row['article_id']; ?>"><?php echo $row['title']; ?></a>－－<?php echo $row['author']; ?></li>
	<?php } ?>
</ul>
<?php include("sidebar.php"); ?>
<?php include("footer.php"); ?>